home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Examples / Movie / Include / MoviePar.h < prev    next >
Encoding:
Text File  |  1994-04-21  |  4.2 KB  |  150 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                            MoviePar.h
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Author:                        Lonnie Millett
  7. //    Creation Date:        3/28/94
  8. //
  9. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. #ifndef MOVIEPAR_H
  14. #define MOVIEPAR_H
  15.  
  16. #ifndef MOVIEDEF_H
  17. #include "MovieDef.h"
  18. #endif
  19.  
  20. #ifndef FWPART_H
  21. #include <FWPart.h>
  22. #endif
  23.  
  24. // ----- Graphic Includes -----
  25.  
  26. #ifndef FWPICSHP_H
  27. #include "FWPicShp.h"
  28. #endif
  29.  
  30. #if defined(FW_BUILD_MAC) && !defined(__MOVIES__)
  31. #include <Movies.h>
  32. #endif
  33.  
  34. #if defined(FW_BUILD_MAC) && !defined(__ALIASES__)
  35. #include <Aliases.h>
  36. #endif
  37.  
  38. //==============================================================================
  39. // Classes defined in this interface
  40. //==============================================================================
  41.  
  42. class CMoviePart;
  43.  
  44. //==============================================================================
  45. // Classes used by this interface
  46. //==============================================================================
  47.  
  48. class FW_CPart;
  49. class CMovieFrame;
  50. class CMovieFacet;
  51. class XMPStorageUnit;
  52. class XMPSession;
  53. class XMPFrame;
  54. class XMPFacet;
  55. class FW_CSelection;
  56.  
  57. //==============================================================================
  58. // Constants
  59. //==============================================================================
  60.  
  61. const XMPCommandID cChooseMovie = 10100;
  62. const XMPCommandID cStartMovie = 10101;
  63. const XMPCommandID cStopMovie = 10102;
  64. const XMPCommandID cSetMovieLooping = 10103;
  65.  
  66. //==============================================================================
  67. // CClockPart
  68. //==============================================================================
  69.  
  70. class CMoviePart : public FW_CPart
  71. {
  72.  
  73. public:
  74.     CMoviePart();
  75.     virtual ~ CDECL CMoviePart();
  76.  
  77.     virtual void Release();
  78.  
  79.     virtual void Initialize();
  80.     
  81.     virtual void InternalizeContent(XMPStorageUnit* storageUnit);
  82.     virtual void ExternalizeContent(XMPStorageUnit* storageUnit);
  83.     
  84.     virtual void AddProperties(XMPStorageUnit* storageUnit);
  85.     virtual XMPValueType GetContentPropertyValueType() const;
  86.     
  87.     FW_Boolean IsQuickTimeInstalled();
  88.     FW_PlatformHandle GetMovieHandle() const;
  89.     void SetMovieHandle(FW_PlatformHandle movieHandle);
  90.     FW_Boolean GetMovieLooping() const;
  91.     void SetMovieLooping(FW_Boolean loop);
  92.     Movie GetNewMovieFromMovieHandle();
  93.     FW_CPictShape GetDefaultPicture() const;
  94.     
  95.     virtual FW_CFrame* NewFrame(XMPFrame* xmpFrame, XMPTypeToken presentation);
  96.     virtual FW_CSelection* NewSelection();
  97.  
  98.  
  99.     virtual FW_Boolean DoMenuEvent(XMPMenuBar *menuBar, XMPCommandID commandID);
  100.     virtual FW_Boolean DoIdle();
  101.     virtual void DoAdjustMenus(XMPMenuBar* menuBar);
  102.  
  103.     AliasHandle GetMovieFileFromUser();
  104.     Movie GetMovieFromAlias(AliasHandle movieAlias);
  105.     
  106.     void ToggleLooping();
  107.     
  108.     FW_CFacet* GetAnyExistingFacet();
  109.     
  110. private:
  111.     FW_Boolean fQuickTimeInstalled;
  112.     FW_PlatformHandle fMovieHandle;
  113.     FW_Boolean fLooping;
  114.     FW_CPictShape fDefaultPicture;
  115. };
  116.  
  117. //----------------------------------------------------------------------------------------
  118. // CMoviePart::IsQuickTimeInstalled
  119. //----------------------------------------------------------------------------------------
  120. inline FW_Boolean CMoviePart::IsQuickTimeInstalled()
  121. {
  122.     return fQuickTimeInstalled;
  123. }
  124.  
  125. //----------------------------------------------------------------------------------------
  126. // CMoviePart::GetMovieHandle
  127. //----------------------------------------------------------------------------------------
  128. inline FW_PlatformHandle CMoviePart::GetMovieHandle() const
  129. {
  130.     return fMovieHandle;
  131. }
  132.  
  133. //----------------------------------------------------------------------------------------
  134. // CMoviePart::GetMovieLooping
  135. //----------------------------------------------------------------------------------------
  136. inline FW_Boolean CMoviePart::GetMovieLooping() const
  137. {
  138.     return fLooping;
  139. }
  140.  
  141. //----------------------------------------------------------------------------------------
  142. // CMoviePart::GetMovieLooping
  143. //----------------------------------------------------------------------------------------
  144. inline FW_CPictShape CMoviePart::GetDefaultPicture() const
  145. {
  146.     return fDefaultPicture;
  147. }
  148.  
  149. #endif
  150.